<!-- <page-header-wrapper [title]="''"></page-header-wrapper>
<nz-card>
  <div nz-row nzGutter="8">
    <div nz-col [nzSpan]="_$expand ? 24 : 18">
      <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
      <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="search()"
        acl [acl-ability]="['FUND-REPORTING-search']">查询</button>
      <button nz-button (click)="resetSF()">重置</button>
      <button nz-button (click)="export()" acl [acl-ability]="['FUND-REPORTING-export']">导出</button>
      <button nz-button nzType="link" (click)="expandToggle()">
        {{ !_$expand ? '展开' : '收起' }}
        <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
      </button>
    </div>
  </div>
</nz-card> -->
<nz-card class="table-box">
  <div class="tab_header">
    <label class="page_title"> <label class="driver">|</label> 资金上报</label>
    <nz-tabset [nzTabBarExtraContent]="extraTemplate" *ngIf="tabs.length > 0">
      <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="selectChange(tab)"> </nz-tab>
    </nz-tabset>
  </div>

  <!-- 数据列表 -->
  <st
    #st
    [scroll]="{ x: '1200px', y: scrollY }"
    [data]="service.$api_get_fund_reporting_page"
    [columns]="columns"
    [req]="{  process: beforeReq }"
    [res]="{  process: dataProcess }"
    [page]="{}"
    (change)="changeSt($event)"
  >
    <ng-template st-row="uploadStatus" let-item>
      <span [ngClass]="{ 'text-red-dark': item?.uploadStatus === '4' }">{{ item?.uploadStatusLabel }}</span>
    </ng-template>
    <ng-template st-row="verifyStatus" let-item>
      <a (click)="viewResult(item)" acl [acl-ability]="['FUND-REPORTING-view-verify-data']" *ngIf="item?.verifyStatus === '2'">{{
        item?.verifyStatusLabel
      }}</a>
      <span *ngIf="item?.verifyStatus !== '2'" (click)="viewResult(item)">{{ item?.verifyStatusLabel }}</span>
    </ng-template>
    <ng-template st-row="orderCode" let-item>
      <a (click)="routeToOrder(item)">{{ item?.orderCode }}</a>
    </ng-template>
    <ng-template st-row="wayBillCode" let-item>
      <a (click)="routeTowaybill(item)">{{ item?.wayBillCode }}</a>
    </ng-template>
    <ng-template st-row="tolalAmount" let-item let-index="index">
      <div class="text-right">{{ item?.tolalAmount | currency }}</div>
    </ng-template>
    <ng-template st-row="payAmount" let-item let-index="index">
      <div class="text-right">{{ item?.payAmount | currency }}</div>
    </ng-template>
  </st>
</nz-card>
<ng-template #extraTemplate>
  <div class="d-flex align-items-center mr-sm">
    <div class="mr-md d-flex align-items-center filter-box">
      <div class="mr-md">
        已选择
        <strong class="text-red">{{ selectedRows.length }}</strong> 条数据
      </div>
      <nz-select [(ngModel)]="sfValue.ltdId" 
      >
      <nz-option *ngFor="let i of netWorkList" [nzLabel]="i.enterpriseName" [nzValue]="i.id" [nzDisabled]="i.disabled">
      </nz-option>
    </nz-select>
    </div>
    <button nz-button nzDanger (click)="search()" acl [acl-ability]="['FUND-REPORTING-search']">查询</button>
 
    <button nz-button nzDanger (click)="export()" acl [acl-ability]="['FUND-REPORTING-export']"> 导出</button>
    <button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
      更多<i nz-icon nzType="down" nzTheme="outline"></i
    ></button>
    <nz-dropdown-menu #menu="nzDropdownMenu">
      <ul nz-menu>
        <li nz-menu-item  acl [acl-ability]="['FUND-REPORTING-searchAll']" (click)="openDrawer()"> 高级筛选 </li>
        <li nz-menu-item (click)="upload()" acl [acl-ability]="['FUND-REPORTING-upload']"> 上传 </li>
        <li nz-menu-item (click)="recall()" acl [acl-ability]="['FUND-REPORTING-recall']"> 撤回 </li>
        <li nz-menu-item (click)="updateData()" acl [acl-ability]="['FUND-REPORTING-upload-data']"> 更新数据 </li>
      </ul>
    </nz-dropdown-menu>
  </div>
</ng-template>
